﻿using System.Collections.Generic;
using System.Data.Entity;

namespace Moonwish.Core.DataAccess
{
    public abstract class SqlStringCommand<T> where T : class
    {
        protected readonly DbContext DbContext;
        protected readonly List<string> Ids;
        protected readonly string UserId;

        protected SqlStringCommand(DbContext dbContext, List<string> ids, string userId)
        {
            DbContext = dbContext;
            Ids = ids;
            UserId = userId;
        }

        protected DbSet<T> DbTable
        {
            get { return DbContext.Set<T>(); }
        }

        public abstract void Execute();
    }
}
